package org.study.springboot.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.study.springboot.model.sftp.UploadInfoBO;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

@RestController
@RequestMapping(value="/api/v1/sftp")
public class SftpController {

    @RequestMapping(value="/test/sftp",method = RequestMethod.GET)
    public void testSftp() throws UnsupportedEncodingException {

        String 中国 = URLEncoder.encode("中国", "UTF-8");
        String encode = URLEncoder.encode("中国", "GBK");
        System.out.println(encode);


        return ;
    }

    public static void main(String[] args) throws UnsupportedEncodingException {
        String 中国 = URLEncoder.encode("中国", "UTF-8");
        String encode = URLEncoder.encode("中国", "GBK");
        System.out.println(encode);
        String gbk = URLDecoder.decode(encode, "GBK");
        System.out.println(gbk);
        System.out.println(10/3);

    }

}
